package com.ming.yygh.sta.controller;

import com.ming.yygh.common.result.Result;
import com.ming.yygh.order.client.OrderFeignClient;
import com.ming.yygh.vo.order.OrderCountQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author Light
 * @date 2021/12/27 14:56
 */
@Api(tags = "统计管理接口")
@RestController
@RequestMapping("admin/statistics")
public class StatisticsController {

    @Resource
    private OrderFeignClient orderFeignClient;

    @ApiOperation(value = "获取预约统计数据")
    @GetMapping("/getCountMap")
    public Result<Map<String, Object>> getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> countMap = orderFeignClient.getCountMap(orderCountQueryVo).getData();
        return Result.ok(countMap);
    }
}
